package de.windeln.marketing.campaign.model;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.NotNull;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.fasterxml.jackson.annotation.JsonProperty;

// see http://java-juice.tumblr.com/post/13102234732/datatables-spring-mvc-integration
// see https://github.com/FasterXML/jackson-annotations
//@JsonIgnoreProperties({ "table", "action"})
//@JsonRootName(value = "data")
//@JsonAutoDetect
//@JsonDeserialize(using = UserDeserializer.class)
//@JsonSerialize(using = NullToEmptySerializer.class)
public class RequestClientObject implements Serializable {

	private static final long serialVersionUID = 5934273982332276747L;

	// different validationrs for save + edit 
	// http://java.dzone.com/articles/bean-validation-and-jsr-303
	
	@JsonProperty("ID")
	private long id;
	@NotNull
	@JsonProperty("CAMPAIGN_NAME")
	private String campaignName;
	@NotNull
	@JsonProperty("REASON_CODE")
	private String reasonCode;
	@JsonProperty("UTM_SOURCE")
	private String utmSource;
	@JsonProperty("UTM_MEDIUM")
	private String utmMedium;
	@JsonProperty("AT_INTERNET_CODE")
	private String atInternetCode;
	@JsonProperty("UTM_CAMPAIGN")
	private String utmCampaign;
	@JsonProperty("START_DATE")
	private Date campaignStart;
	@JsonProperty("END_DATE")
	private Date campaignEnd;
	@JsonProperty("FIX_COSTS")
	private double fixCosts;
	@JsonProperty("VARIABLE")
	private String variable;
	@JsonProperty("COST_PER_VARIABLE")
	private double costPerVariable;
	@JsonProperty("NUMBER_OF_VARIABLE")
	private int numberOfVariable;
	@JsonProperty("DESCRIPTION")
	private String campaignDescription;

	private String analyticsLink;
	private double totalCosts;
	private boolean campaignDeleted;
	private int campaignVersion;
	private long promocodeId;
	private boolean promocodeDeleted;
	private int promocodeVersion;

	@JsonProperty("Pro_CodeName")
	private String promocode;
	@JsonProperty("Pro_StartDate")
	private Date promocodeStartDate;
	@JsonProperty("Pro_EndDate")
	private Date promocodeEndDate;
	@JsonProperty("Pro_Zuordnung")
	private String promocodeZuordnung;
	@JsonProperty("Pro_Type")
	private String promocodeType;
	@JsonProperty("Pro_Nutzniesser")
	private String promocodeNutzniesser;
	@JsonProperty("Pro_ValueProvided")
	private double promocodeValueProvided;
	@JsonProperty("Pro_ValueType")
	private String promocodeValueType;

	public String getReasonCode() {
		return reasonCode;
	}

	public void setReasonCode(String reasonCode) {
		this.reasonCode = reasonCode;
	}

	public double getFixCosts() {
		return fixCosts;
	}

	public void setFixCosts(double fixCosts) {
		this.fixCosts = fixCosts;
	}

	public boolean isCampaignDeleted() {
		return campaignDeleted;
	}

	public void setCampaignDeleted(boolean campaignDeleted) {
		this.campaignDeleted = campaignDeleted;
	}

	public int getCampaignVersion() {
		return campaignVersion;
	}

	public void setCampaignVersion(int campaignVersion) {
		this.campaignVersion = campaignVersion;
	}

	public boolean isPromocodeDeleted() {
		return promocodeDeleted;
	}

	public void setPromocodeDeleted(boolean promocodeDeleted) {
		this.promocodeDeleted = promocodeDeleted;
	}

	public int getPromocodeVersion() {
		return promocodeVersion;
	}

	public void setPromocodeVersion(int promocodeVersion) {
		this.promocodeVersion = promocodeVersion;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getCampaignName() {
		return campaignName;
	}

	public void setCampaignName(String campaignName) {
		this.campaignName = campaignName;
	}

	public String getUtmMedium() {
		return utmMedium;
	}

	public void setUtmMedium(String utmMedium) {
		this.utmMedium = utmMedium;
	}

	public double getTotalCosts() {
		return totalCosts;
	}

	public void setTotalCosts(double totalCosts) {
		this.totalCosts = totalCosts;
	}

	public String getAnalyticsLink() {
		return analyticsLink;
	}

	public void setAnalyticsLink(String analyticsLink) {
		this.analyticsLink = analyticsLink;
	}

	public String getUtmSource() {
		return utmSource;
	}

	public void setUtmSource(String utmSource) {
		this.utmSource = utmSource;
	}

	public String getAtInternetCode() {
		return atInternetCode;
	}

	public void setAtInternetCode(String atInternetCode) {
		this.atInternetCode = atInternetCode;
	}

	public String getUtmCampaign() {
		return utmCampaign;
	}

	public void setUtmCampaign(String utmCampaign) {
		this.utmCampaign = utmCampaign;
	}

	public Date getCampaignStart() {
		return campaignStart;
	}

	public void setCampaignStart(Date campaignStart) {
		this.campaignStart = campaignStart;
	}

	public Date getCampaignEnd() {
		return campaignEnd;
	}

	public void setCampaignEnd(Date campaignEnd) {
		this.campaignEnd = campaignEnd;
	}

	public String getVariable() {
		return variable;
	}

	public void setVariable(String variable) {
		this.variable = variable;
	}

	public double getCostPerVariable() {
		return costPerVariable;
	}

	public void setCostPerVariable(double costPerVariable) {
		this.costPerVariable = costPerVariable;
	}

	public int getNumberOfVariable() {
		return numberOfVariable;
	}

	public void setNumberOfVariable(int numberOfVariable) {
		this.numberOfVariable = numberOfVariable;
	}

	public String getCampaignDescription() {
		return campaignDescription;
	}

	public void setCampaignDescription(String campaignDescription) {
		this.campaignDescription = campaignDescription;
	}

	public long getPromocodeId() {
		return promocodeId;
	}

	public void setPromocodeId(long promocodeId) {
		this.promocodeId = promocodeId;
	}

	public String getPromocode() {
		return promocode;
	}

	public void setPromocode(String promocode) {
		this.promocode = promocode;
	}

	public Date getPromocodeStartDate() {
		return promocodeStartDate;
	}

	public void setPromocodeStartDate(Date promocodeStartDate) {
		this.promocodeStartDate = promocodeStartDate;
	}

	public Date getPromocodeEndDate() {
		return promocodeEndDate;
	}

	public void setPromocodeEndDate(Date promocodeEndDate) {
		this.promocodeEndDate = promocodeEndDate;
	}

	public String getPromocodeZuordnung() {
		return promocodeZuordnung;
	}

	public void setPromocodeZuordnung(String promocodeZuordnung) {
		this.promocodeZuordnung = promocodeZuordnung;
	}

	public String getPromocodeType() {
		return promocodeType;
	}

	public void setPromocodeType(String promocodeType) {
		this.promocodeType = promocodeType;
	}

	public String getPromocodeNutzniesser() {
		return promocodeNutzniesser;
	}

	public void setPromocodeNutzniesser(String promocodeNutzniesser) {
		this.promocodeNutzniesser = promocodeNutzniesser;
	}

	public double getPromocodeValueProvided() {
		return promocodeValueProvided;
	}

	public void setPromocodeValueProvided(double promocodeValueProvided) {
		this.promocodeValueProvided = promocodeValueProvided;
	}

	public String getPromocodeValueType() {
		return promocodeValueType;
	}

	public void setPromocodeValueType(String promocodeValueType) {
		this.promocodeValueType = promocodeValueType;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.SHORT_PREFIX_STYLE);
	}

}
